package cn.jhc.service;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import cn.jhc.DAO.GoodsDao;
import cn.jhc.DAO.ShopCarDao;
import cn.jhc.model.Goods;
import cn.jhc.model.ShopCar;

@Service
public class ShopCarService {
	
	private ShopCarDao shopCarDao;

	
   public ShopCarDao getShopCarDao() {
		return shopCarDao;
	}
   @Resource
	public void setShopCarDao(ShopCarDao shopCarDao) {
		this.shopCarDao = shopCarDao;
	}

	
	@Transactional
   public void addshopcar(ShopCar shopCar){
	   this.shopCarDao.addShopCar(shopCar);;
   }
	@Transactional
	public void removeshopcar(ShopCar shopCar){
		this.shopCarDao.remove(shopCar);
	}
	@Transactional
	public ShopCar findshopCarById(int id){
		return this.shopCarDao.findShopCarById(id);
		
	}
	@Transactional
	public void updateGood(ShopCar shopCar){
		this.shopCarDao.update(shopCar);;
	}
}
